Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add tests for latest release of Eclipse #3661

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

briandealwis
Copy link
Member

Add support for running tests against the latest release of Eclipse (https://download.eclipse.org/releases/latest).

I had to add javax.inject to several bundles: I think something must have stopped adding javax.inject to the system bundle.

@chanseokoh
Copy link
Contributor

For the only Java 8 build, it's failing due to something no longer supporting Java 8:

Caused by: java.lang.UnsupportedClassVersionError: org/eclipse/tycho/core/p2/P2ArtifactRepositoryLayout has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Error: ERROR] Some problems were encountered while processing the POMs:
Error:  Invalid artifact repository: Unable to provision, see the following errors:

1) Error in custom provider, java.lang.TypeNotPresentException: Type org.eclipse.tycho.core.p2.P2ArtifactRepositoryLayout not present
  at ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:2.5.0, parent: sun.misc.Launcher$AppClassLoader@7852e922] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
  while locating org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout annotated with @com.google.inject.name.Named(value=p2)

1 error @ 
 @ 
Error: RROR] The build could not read 1 project -> [Help 1]
Error: RROR]   
Error: RROR]   The project com.google.cloud.tools.eclipse:trunk:0.1.0-SNAPSHOT (/home/runner/work/google-cloud-eclipse/google-cloud-eclipse/pom.xml) has 1 error
Error: RROR]     Invalid artifact repository: Unable to provision, see the following errors:
Error: RROR]     
Error: RROR]     1) Error in custom provider, java.lang.TypeNotPresentException: Type org.eclipse.tycho.core.p2.P2ArtifactRepositoryLayout not present
Error: RROR]       at ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:2.5.0, parent: sun.misc.Launcher$AppClassLoader@7852e922] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
Error: RROR]       while locating org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout annotated with @com.google.inject.name.Named(value=p2)
Error: RROR]     
Error: RROR]     1 error: org/eclipse/tycho/core/p2/P2ArtifactRepositoryLayout has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

@chanseokoh
Copy link
Contributor

Actually, Kokoro Windows is running Java 8, so that's failing with the same error. We can easily upgrade Java there to 11 though.

@chanseokoh
Copy link
Contributor

For the other failures, it's compilation errors:

Error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default) on project com.google.cloud.tools.eclipse.appengine.deploy.ui: Compilation failure: Compilation failure: 
Error: [ERROR] /home/runner/work/google-cloud-eclipse/google-cloud-eclipse/plugins/com.google.cloud.tools.eclipse.appengine.deploy.ui/src/com/google/cloud/tools/eclipse/appengine/deploy/ui/standard/StandardDeployCommandHandler.java:[100,76] non-static variable CANCEL_LABEL cannot be referenced from a static context
Error: [ERROR] /home/runner/work/google-cloud-eclipse/google-cloud-eclipse/plugins/com.google.cloud.tools.eclipse.appengine.deploy.ui/src/com/google/cloud/tools/eclipse/appengine/deploy/ui/standard/StandardDeployCommandHandler.java:[102,80] incompatible types: int cannot be converted to java.lang.String[]
Error: [ERROR] -> [Help 1]
Error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default) on project com.google.cloud.tools.eclipse.appengine.localserver: Compilation failure: Compilation failure: 
Error: [ERROR] /home/runner/work/google-cloud-eclipse/google-cloud-eclipse/plugins/com.google.cloud.tools.eclipse.appengine.localserver/src/com/google/cloud/tools/eclipse/appengine/localserver/ui/ServerPortExtension.java:[110,23] cannot find symbol
Error: [ERROR]   symbol:   method showHoverText(java.lang.String)
Error: [ERROR]   location: variable portDecoration of type org.eclipse.jface.fieldassist.ControlDecoration
Error: [ERROR] /home/runner/work/google-cloud-eclipse/google-cloud-eclipse/plugins/com.google.cloud.tools.eclipse.appengine.localserver/src/com/google/cloud/tools/eclipse/appengine/localserver/ui/DatastoreIndexesUpdatedStatusHandler.java:[98,37] incompatible types: int cannot be converted to java.lang.String[]
Error: [ERROR] /home/runner/work/google-cloud-eclipse/google-cloud-eclipse/plugins/com.google.cloud.tools.eclipse.appengine.localserver/src/com/google/cloud/tools/eclipse/appengine/localserver/ui/GcpLocalRunTab.java:[442,25] cannot find symbol
Error: [ERROR]   symbol:   method showHoverText(java.lang.String)
Error: [ERROR]   location: variable serviceKeyDecoration of type org.eclipse.jface.fieldassist.ControlDecoration
Error: [ERROR] -> [Help 1]
Error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default) on project com.google.cloud.tools.eclipse.dataflow.ui: Compilation failure: Compilation failure: 
Error: [ERROR] /home/runner/work/google-cloud-eclipse/google-cloud-eclipse/plugins/com.google.cloud.tools.eclipse.dataflow.ui/src/com/google/cloud/tools/eclipse/dataflow/ui/preferences/RunOptionsDefaultsComponent.java:[653,31] cannot find symbol
Error: [ERROR]   symbol:   method showHoverText(java.lang.String)
Error: [ERROR]   location: variable stagingLocationResults of type org.eclipse.jface.fieldassist.ControlDecoration
Error: [ERROR] /home/runner/work/google-cloud-eclipse/google-cloud-eclipse/plugins/com.google.cloud.tools.eclipse.dataflow.ui/src/com/google/cloud/tools/eclipse/dataflow/ui/util/SelectFirstMatchingPrefixListener.java:[65,20] cannot find symbol
Error: [ERROR]   symbol:   method getCaretPosition()
Error: [ERROR]   location: variable targetCombo of type org.eclipse.swt.widgets.Combo
Error: [ERROR] -> [Help 1]
Error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default) on project com.google.cloud.tools.eclipse.swtbot: Compilation failure: Compilation failure: 
Error: [ERROR] /home/runner/work/google-cloud-eclipse/google-cloud-eclipse/plugins/com.google.cloud.tools.eclipse.swtbot/src/com/google/cloud/tools/eclipse/swtbot/SwtBotTestingUtilities.java:[106,21] cannot find symbol
Error: [ERROR]   symbol:   method post(org.eclipse.swt.widgets.Event)
Error: [ERROR]   location: class org.eclipse.swt.widgets.Display
Error: [ERROR] /home/runner/work/google-cloud-eclipse/google-cloud-eclipse/plugins/com.google.cloud.tools.eclipse.swtbot/src/com/google/cloud/tools/eclipse/swtbot/SwtBotTestingUtilities.java:[109,21] cannot find symbol
Error: [ERROR]   symbol:   method post(org.eclipse.swt.widgets.Event)
Error: [ERROR]   location: class org.eclipse.swt.widgets.Display
Error: [ERROR] /home/runner/work/google-cloud-eclipse/google-cloud-eclipse/plugins/com.google.cloud.tools.eclipse.swtbot/src/com/google/cloud/tools/eclipse/swtbot/SwtBotWorkbenchActions.java:[128,12] cannot find symbol
Error: [ERROR]   symbol:   method post(org.eclipse.swt.widgets.Event)
Error: [ERROR]   location: variable display of type org.eclipse.swt.widgets.Display
Error: [ERROR] /home/runner/work/google-cloud-eclipse/google-cloud-eclipse/plugins/com.google.cloud.tools.eclipse.swtbot/src/com/google/cloud/tools/eclipse/swtbot/SwtBotWorkbenchActions.java:[135,12] cannot find symbol
Error: [ERROR]   symbol:   method post(org.eclipse.swt.widgets.Event)
Error: [ERROR]   location: variable display of type org.eclipse.swt.widgets.Display
Error: [ERROR] /home/runner/work/google-cloud-eclipse/google-cloud-eclipse/plugins/com.google.cloud.tools.eclipse.swtbot/src/com/google/cloud/tools/eclipse/swtbot/SwtBotWorkbenchActions.java:[138,12] cannot find symbol
Error: [ERROR]   symbol:   method post(org.eclipse.swt.widgets.Event)
Error: [ERROR]   location: variable display of type org.eclipse.swt.widgets.Display

Copy link
Contributor

@chanseokoh chanseokoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this up! This should fix #3659, I suppose?

<product.version.qualifier.suffix/> <!-- 0-length string by default -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<eclipse.target>2018-09</eclipse.target> <!-- the default build -->
<!-- <eclipse.target>latest-release</eclipse.target> --> <!-- the default build -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess your intention is to have this as documentation, which is nice. But what usually happens is that someone who sees this later just cleans up these kinds of comments, thinking that they are unnecessary code or mistakenly left.

<activation>
<property>
<name>!eclipse.target</name>
<!-- when no longer the default: <name>eclipse.target</name> <value>2018-09</value> -->
<!-- <name>eclipse.target</name> <value>latest-release</value> -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@briandealwis
Copy link
Member Author

Oops, I should have marked this as "draft". It compiles on my macbook, but I hadn't actually tried running the real tests.

These cannot find symbol: org.eclipse.swt.* indicate that we're somehow not pulling down the right SWT libraries. I need to look at the target-platform definition.

zhumin8 added a commit that referenced this pull request Aug 1, 2022
update readme with info to reflect that Eclipse 4.22 and later are currently not supported. Eclipse latest is currently on 4.24 now and 4.25 will come out soon.
Related issues got fired in #3659, #3660, #3678; attempts to fix in #3661 but no progress since.
Suggest adding this to readme and removing when this issue actually get fixed.
zhumin8 added a commit that referenced this pull request Aug 1, 2022
update readme with info to reflect that Eclipse 4.22 and later are currently not supported. Eclipse latest is currently on 4.24 now and 4.25 will come out soon.
Related issues got fired in #3659, #3660, #3678; attempts to fix in #3661 but no progress since.
Adding this to readme. Remove when this issue actually get fixed.
@briandealwis briandealwis marked this pull request as draft September 19, 2022 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants